package com.wkq.move.module.main.frame.presenter

import com.wkq.base.frame.mosby.MvpBasePresenter
import com.wkq.move.module.main.frame.view.MoveView
import com.wkq.move.module.main.frame.view.MovesView
import com.wkq.net.model.MoveListsInfo
import com.wkq.net.net.UsTvShowDataCallBack
import com.wkq.net.net.UsTvShowHtmlUtil

/**
 *
 * 作者:吴奎庆
 *
 * 时间:2020/5/22
 *
 * 用途:
 */


class MoviesPresenter : MvpBasePresenter<MovesView>() {
    fun getData( index: String?) {
        UsTvShowHtmlUtil.getMoveList(index, object : UsTvShowDataCallBack<MoveListsInfo> {
            override fun onFail(message: String?) {
                if(view!=null) { view.showMessage("数据异常") }
            }

            override fun onSuccess(infos: MoveListsInfo?) {
                if(view!=null) { view.showInfos(infos) }
            }

            override fun onLoading() {

            }
        })

    }

}